//
//  XMNetwork+mine.m
//  XMJJ_zml
//
//  Created by apple on 2025/5/10.
//

#import "XMNetwork+mine.h"

@implementation XMNetwork (mine)

/**
 个人信息
 */
- (void)getUserInfoSuccess:(void (^)(id _Nonnull))successBlock
                   failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [self getDataWithPath:mineInfo
               parameters:parameters
                needToken:YES
                  headers:@{}
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 修改基本信息
 */
- (void)changeBasicInfoWithBasicInfo:(NSDictionary *)userInfoDic
                             success:(void (^)(id _Nonnull))successBlock
                             failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionaryWithDictionary:userInfoDic];
    [self postDataWithPath:changeBasicInfoUrl
                parameters:parameters
                 needToken:YES
                   headers:@{}
                   success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 推荐朋友列表
 */
- (void)getRecommendFriendList:(void (^)(id _Nonnull))successBlock
                       failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [self getDataWithPath:recommendFriend
               parameters:parameters
                needToken:YES
                  headers:@{}
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 搜索朋友列表
 */
- (void)getSearchFriendListWithSearchKey:(NSString *)searchKey
                                 success:(void (^)(id _Nonnull))successBlock
                                 failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:searchKey forKey:@"key"];
    [self postDataWithPath:searchFriend
                parameters:parameters
                 needToken:YES
                   headers:@{}
                   success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 关注
 */
- (void)friendAttentionWithUserId:(NSString *)userId
                          success:(void (^)(id _Nonnull))successBlock
                          failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:userId forKey:@"userId"];
    [self postDataWithPath:friendAttention
                parameters:parameters
                 needToken:YES
                   headers:@{}
           showPrograssHUD:NO
                   success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 取消关注
 */
- (void)cancelAttentionWithUserId:(NSString *)userId
                          success:(void (^)(id _Nonnull))successBlock
                          failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:userId forKey:@"userId"];
    [self postDataWithPath:friendCancenAttention
                parameters:parameters
                 needToken:YES
                   headers:@{}
           showPrograssHUD:NO
                   success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 通讯录好友信息
 */
- (void)getAddressBookWithUserList:(NSArray *)userList
                           success:(void (^)(id _Nonnull))successBlock
                           failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
//    NSArray *arr = @[@{@"name" : @"丁浩", @"phone" : @"13522446643"}];
    
    [parameters safe_setObject:userList forKey:@"items"];
    [self postDataWithPath:addressBookFriendInfo
                parameters:parameters
                 needToken:YES
                   headers:@{}
                   success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 主页信息
 */
- (void)getHomePageInfoSuccess:(void (^)(id _Nonnull))successBlock
                       failure:(nonnull void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [self getDataWithPath:getHomePageInfoUrl
               parameters:parameters
                needToken:YES
                  headers:@{}
          showPrograssHUD:NO
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 他人个人信息
 */
- (void)getOtherInfoWithUserId:(NSString *)userId
                       success:(void (^)(id _Nonnull))successBlock failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:userId forKey:@"userId"];
    [self getDataWithPath:getOtherInfoUrl
               parameters:parameters
                needToken:YES
                  headers:@{}
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 用户基本信息
 */
- (void)getUserBasicInfoSuccess:(void (^)(id _Nonnull))successBlock
                        failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [self getDataWithPath:getUserBasicInfoUrl
               parameters:parameters
                needToken:YES
                  headers:@{}
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 上传头像
 */
- (void)updateAvatarWithImg:(UIImage *)avatar
                    success:(void (^)(id _Nonnull))successBlock
                    failure:(void (^)(NSError * _Nonnull))failureBlock {
//    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [self upLoadImgWithPath:updateAvatarUrl
                        img:avatar
                    success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 更换手机号
 */
- (void)changeMobileWithNewMobile:(NSString *)mobileStr
                             code:(NSString *)codeStr
                          success:(void (^)(id _Nonnull))successBlock
                          failire:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:mobileStr forKey:@"mobile"];
    [parameters safe_setObject:codeStr forKey:@"code"];
    [self putDataWithPath:changeMobileUrl
               parameters:parameters
                needToken:YES
                  headers:@{}
          showPrograssHUD:YES
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 修改密码
 */
- (void)pwSetWithNewPW:(NSString *)newPw code:(NSString *)codeStr success:(void (^)(id _Nonnull))successBlock failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:newPw forKey:@"password"];
    [parameters safe_setObject:codeStr forKey:@"code"];
    [self putDataWithPath:changePWUrl
               parameters:parameters
                needToken:YES
                  headers:@{}
          showPrograssHUD:YES
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 职业列表
 */
- (void)getJobListSuccess:(void (^)(id _Nonnull))successBlock
                  failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [self getDataWithPath:jobListUrl
               parameters:parameters
                needToken:YES   
                  headers:@{}
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 获取地区树
 */
- (void)getAreaListSuccess:(void (^)(id _Nonnull))successBlock
                   failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [self getDataWithPath:areaListUrl
               parameters:parameters
                needToken:NO
                  headers:@{}
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 实名认证
 */
- (void)realNameAuthenWithName:(NSString *)name
                          idNo:(NSString *)idNo
                       success:(void (^)(id _Nonnull))successBlock
                       failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:name forKey:@"name"];
    [parameters safe_setObject:idNo forKey:@"idNo"];
    [self postDataWithPath:realNameAuthenUrl
                parameters:parameters
                 needToken:YES
                   headers:@{}
                   success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 我的作品
 */
- (void)getMyProductsSuccess:(void (^)(id _Nonnull))successBlock
                     failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [self getDataWithPath:myProductsUrl
               parameters:parameters
                needToken:YES
                  headers:@{}
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 我的收藏
 */
- (void)getMyCollectWithPage:(NSString *)pageStr
                     success:(void (^)(id _Nonnull))successBlock
                     failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:pageStr forKey:@"pageNum"];
    [parameters safe_setObject:@"10" forKey:@"pageSize"];
    [self postDataWithPath:myCollectMeetUrl//myProductsUrl
                parameters:parameters
                 needToken:YES
                   headers:@{}
                   success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 我喜欢的
 */
- (void)getMyLikeWithPage:(NSString *)pageStr
                  success:(void (^)(id _Nonnull))successBlock
                  failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:pageStr forKey:@"pageNum"];\
    [parameters safe_setObject:@"10" forKey:@"pageSize"];
    [self getDataWithPath:myLikeUrl
               parameters:parameters
                needToken:YES
                  headers:@{}
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 钱包余额
 */
- (void)getBalanceSuccess:(void (^)(id _Nonnull))successBlock
                  failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [self getDataWithPath:getBalanceUrl
               parameters:parameters
                needToken:YES
                  headers:@{}
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 提现记录
 */
- (void)getWithdrawRecordWithPage:(NSString *)pageStr
                          success:(void (^)(id _Nonnull))successBlock
                          failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:pageStr forKey:@"pageNum"];
    [parameters safe_setObject:@"10" forKey:@"pageSize"];
    [self getDataWithPath:withdrawRecordUrl
               parameters:parameters
                needToken:YES
                  headers:@{}
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 提现
 */
- (void)withdrawWithMoney:(NSString *)moneyStr
                  payType:(NSString *)payType
               payAccount:(NSString *)payAccount
                  success:(void (^)(id _Nonnull))successBlock
                  failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:moneyStr forKey:@"money"];
    [parameters safe_setObject:payType forKey:@"payType"];  //1 微信。2 支付宝
    [parameters safe_setObject:payAccount forKey:@"payeeAccount"];
    [self getDataWithPath:withdrawActionUrl
               parameters:parameters
                needToken:YES
                  headers:@{}
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 提交反馈
 */
- (void)submitFeedbackWithSelection:(NSString *)selection
                            content:(NSString *)content
                               imgs:(NSString *)imgs
                            success:(void (^)(id _Nonnull))successBlock
                            failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:selection forKey:@"selection"];
    [parameters safe_setObject:content forKey:@"content"];
    [parameters safe_setObject:imgs forKey:@"imgs"];
    [self postDataWithPath:submitFeedbackUrl
                parameters:parameters
                 needToken:YES
                   headers:@{}
                   success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 退出登录
 */
- (void)logoutSuccess:(void (^)(id _Nonnull))successBlock failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [self postDataWithPath:logoutUrl
                parameters:parameters
                 needToken:YES
                   headers:@{}
                   success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 注销账号
 */
- (void)cancelAccountSuccess:(void (^)(id _Nonnull))successBlock failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [self postDataWithPath:cancelAccountUrl
                parameters:parameters
                 needToken:YES
                   headers:@{}
                   success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 我的见面
 */
- (void)getMyMeetingWithStatus:(NSString *)statusStr
                       deleted:(NSString *)deleted
                        userId:(NSString *)userId
                       pageNum:(NSString *)pageNumStr
                       success:(void (^)(id _Nonnull))successBlock
                       failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:statusStr forKey:@"status"];
    [parameters safe_setObject:@(0) forKey:@"deleted"];
    [parameters safe_setObject:userId forKey:@"userId"];
    [parameters safe_setObject:pageNumStr forKey:@"pageNum"];
    [parameters safe_setObject:@"10" forKey:@"pageSize"];
    [self postDataWithPath:myMeetingUrl
                parameters:parameters
                 needToken:YES
                   headers:@{}
                   success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/*
 见面箱
 */
- (void)getMyMeetBoxSuccess:(void (^)(id _Nonnull))successBlock
                    failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [self postDataWithPath:myMeetBoxUrl
                parameters:parameters
                 needToken:YES
                   headers:@{}
                   success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 删除见面箱内见面
 */
- (void)myMeetBoxDeleteMeetWithCartIds:(NSString *)cardIds
                               success:(void (^)(id _Nonnull))successBlock
                               failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:cardIds forKey:@"cartIds"];
    [self postDataWithPath:meetBoxDeleteUrl
                parameters:parameters
                 needToken:YES
                   headers:@{}
                   success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 我的订单
 */
- (void)getMyOrderListWithStatus:(NSString *)statusStr //状态 0全部，10等付款，20待见面，30见面中，40待评价，50退款售后
                         pageNum:(NSString *)pageNum
                       buyOrShow:(NSString *)buyOrShow //1表示我买到的，2表示我卖的
                         success:(void (^)(id _Nonnull))successBlock
                         failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:statusStr forKey:@"status"];
    [parameters safe_setObject:pageNum forKey:@"pageNum"];
    [parameters safe_setObject:@"10" forKey:@"pageSize"];
    [parameters safe_setObject:buyOrShow forKey:@"buyOrShow"];
    [self postDataWithPath:myOrderListUrl
                parameters:parameters
                 needToken:YES
                   headers:@{}
                   success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 浏览记录
 */
- (void)getMyBrowsHistoryWithPage:(NSString *)pageNumStr
                          success:(void (^)(id _Nonnull))successBlock
                          failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:pageNumStr forKey:@"pageNum"];
    [parameters safe_setObject:@"10" forKey:@"pageSize"];
    [self getDataWithPath:myBrowsHistoryUrl
               parameters:parameters
                needToken:YES
                  headers:@{}
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 浏览产品记录
 */
- (void)getMyBrowseMeetHisWithPage:(NSString *)pageNumStr
                           success:(void (^)(id _Nonnull))successBlock
                           failure:(nonnull void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:pageNumStr forKey:@"pageNum"];
    [parameters safe_setObject:@"10" forKey:@"pageSize"];
    [self getDataWithPath:myBrowseMeetHisUrl
               parameters:parameters
                needToken:YES
                  headers:@{}
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 我的地址列表
 */
- (void)getMyAddressListSuccess:(void (^)(id _Nonnull))successBlock
                        failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [self getDataWithPath:myAddressListUrl
               parameters:parameters
                needToken:YES
                  headers:@{}
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 创建地址
 */
- (void)creatAddressWithName:(NSString *)name
                      mobile:(NSString *)mobile
                      areaId:(NSString *)areaId
               detailAddress:(NSString *)detailAddress
               defaultStatus:(id)defaultStatus
                     success:(void (^)(id _Nonnull))successBlock
                     failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:name forKey:@"name"];
    [parameters safe_setObject:mobile forKey:@"mobile"];
    [parameters safe_setObject:areaId forKey:@"areaId"];
    [parameters safe_setObject:detailAddress forKey:@"detailAddress"];
    [parameters safe_setObject:defaultStatus forKey:@"defaultStatus"];
    [parameters safe_setObject:@"" forKey:@"addrpoint"];
    [self postDataWithPath:addAddressUrl
                parameters:parameters
                 needToken:YES
                   headers:@{}
                   success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 更新地址
 */
- (void)addressUpdateWithId:(NSString *)addressId
                       name:(NSString *)name
                     mobile:(NSString *)mobile
                     areaId:(NSString *)areaId
              detailAddress:(NSString *)detailAddress
              defaultStatus:(id)defaultStatus
                    success:(void (^)(id _Nonnull))successBlock
                    failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:addressId forKey:@"id"];
    [parameters safe_setObject:name forKey:@"name"];
    [parameters safe_setObject:mobile forKey:@"mobile"];
    [parameters safe_setObject:areaId forKey:@"areaId"];
    [parameters safe_setObject:detailAddress forKey:@"detailAddress"];
    [parameters safe_setObject:defaultStatus forKey:@"defaultStatus"];
    [parameters safe_setObject:@"" forKey:@"addrpoint"];
    [self putDataWithPath:addressUpdateUrl
               parameters:parameters
                needToken:YES
                  headers:@{}
          showPrograssHUD:YES
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 最近访客
 */
- (void)getLatelyVisitorsSuccess:(void (^)(id _Nonnull))successBlock
                         failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [self getDataWithPath:latelyVisitorsUrl
               parameters:parameters
                needToken:YES
                  headers:@{}
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 删除结束的见面
 */
- (void)deleteOverMeetingWithOrderId:(NSString *)orderId
                             success:(void (^)(id _Nonnull))successBlock
                             failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:orderId forKey:@"orderId"];
    [self getDataWithPath:deleteOverMeetingUrl
               parameters:parameters
                needToken:YES
                  headers:@{}
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 删除见聊
 */
- (void)deleteMeetingWithServiceId:(NSString *)serviceId
                           success:(void (^)(id _Nonnull))successBlock
                           failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:serviceId forKey:@"serviceId"];
    [self getDataWithPath:deleteMeetringUrl
               parameters:parameters
                needToken:YES
                  headers:@{}
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 见面下架
 */
- (void)meetingSoldOutWithServiceId:(NSString *)serviceId
                            success:(void (^)(id _Nonnull))successBlock
                            failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:serviceId forKey:@"serviceId"];
    [self getDataWithPath:meetingSoldOutUrl
               parameters:parameters
                needToken:YES
                  headers:@{}
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 见面上架
 */
- (void)meetingReputawayWithServiceId:(NSString *)serviceId
                              success:(void (^)(id _Nonnull))successBlock
                              failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:serviceId forKey:@"serviceId"];
    [self getDataWithPath:meetingReputawayUrl
               parameters:parameters
                needToken:YES
                  headers:@{}
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 删除浏览作品记录
 */
- (void)deleteMyBrowseProductionWithVideoIds:(NSArray *)videoIds
                                     success:(void (^)(id _Nonnull))successBlock
                                     failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:videoIds forKey:@"videoIds"];
    [self getDataWithPath:deleteBrowseUrl
               parameters:parameters
                needToken:YES
                  headers:@{}
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 删除所有浏览记录
 */
- (void)deleteAllBrowseSuccess:(void (^)(id _Nonnull))successBlock
                       failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [self getDataWithPath:deleteAllBrowseUrl
               parameters:parameters
                needToken:YES
                  headers:@{}
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 清空浏览见面记录
 */
- (void)clearMyBrowseMeetSuccess:(void (^)(id _Nonnull))successBlock
                         failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [self getDataWithPath:clearAllMeetBrowseUrl
               parameters:parameters
                needToken:YES
                  headers:@{}
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 订单详情
 */
- (void)getOrderDetailWithOrderId:(NSString *)orderId
                          success:(void (^)(id _Nonnull))successBlock
                          failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:orderId forKey:@"orderId"];
    [self getDataWithPath:getOrderDetailUrl
               parameters:parameters
                needToken:YES
                  headers:@{}
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 退款规则
 */
- (void)getReturnRuleSuccess:(void (^)(id _Nonnull))successBlock
                     failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:@"3" forKey:@"type"];
    [self getDataWithPath:getReturnRuleUrl
               parameters:parameters
                needToken:YES
                  headers:@{}
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 申请退款
 */
- (void)applyForReturnWithOrderId:(NSString *)orderId
                         reasonMy:(nonnull NSString *)reasonMyStr
                      reasonOther:(nonnull NSString *)reasonOtherStr
                    reasonExplain:(nonnull NSString *)reasonExplainStr
                          success:(void (^)(id _Nonnull))successBlock
                          failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:orderId forKey:@"orderId"];
    [parameters safe_setObject:reasonMyStr forKey:@"reasonMy"];
    [parameters safe_setObject:reasonOtherStr forKey:@"reasonOther"];
    [parameters safe_setObject:reasonExplainStr forKey:@"reasonShuoming"];
    [self postDataWithPath:applyForReturnUrl
                parameters:parameters
                 needToken:YES
                   headers:@{}
                   success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 取消退款
 */
- (void)cancelRefundWithRefundId:(NSString *)refundId
                         success:(void (^)(id _Nonnull))successBlock
                         failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:refundId forKey:@"id"];
    [self getDataWithPath:cancelRefundUrl
               parameters:parameters
                needToken:YES
                  headers:@{}
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 处理退款
 */
- (void)dealwithRefundWithRefundId:(NSString *)refundId
                            accept:(NSString *)acceptStr
                            reason:(NSString *)reasonStr
                           success:(void (^)(id _Nonnull))successBlock
                           failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:refundId forKey:@"refundId"];
    [parameters safe_setObject:acceptStr forKey:@"accept"];
    [parameters safe_setObject:reasonStr forKey:@"rejectReason"];
    [self postDataWithPath:dealWithRefundUrl
                parameters:parameters
                 needToken:YES
                   headers:@{}
                   success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 结束见面
 */
- (void)meetOverWithOrderNo:(NSString *)orderNo
                    success:(void (^)(id _Nonnull))successBlock
                    failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:orderNo forKey:@"orderNo"];
    [self getDataWithPath:meetOverUrl
               parameters:parameters
                needToken:YES
                  headers:@{}
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 提交评价
 */
- (void)evaluateConfirmWithParameters:(NSDictionary *)parameters
                              success:(void (^)(id _Nonnull))successBlock
                              failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *saveParameters = [NSMutableDictionary dictionaryWithDictionary:parameters];
    [self postDataWithPath:meetEvaluateUrl
                parameters:saveParameters
                 needToken:YES
                   headers:@{}
                   success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 提交获取转卖信息
 */
- (void)getResellInfoWithOrderId:(NSString *)orderId
                           money:(NSString *)priceStr
                         success:(void (^)(id _Nonnull))successBlock
                         failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:orderId forKey:@"orderId"];
    [parameters safe_setObject:priceStr forKey:@"money"];
    [self postDataWithPath:getResellInfoUrl
                parameters:parameters
                 needToken:YES
                   headers:@{}
                   success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 获取转卖详情
 */
- (void)getResellDetailInfoWitContent:(NSString *)contentStr success:(void (^)(id _Nonnull))successBlock failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:contentStr forKey:@"content"];
    [self postDataWithPath:getResellDetailInfoUrl
                parameters:parameters
                 needToken:YES
                   headers:@{}
                   success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 提交转卖
 */
- (void)resellConfirmWithServiceId:(NSString *)serviceId
                           success:(void (^)(id _Nonnull))successBlock
                           failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:serviceId forKey:@"serviceId"];
    [self getDataWithPath:resellConfirmUrl
               parameters:parameters
                needToken:YES
                  headers:@{}
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 赠送
 */
- (void)getGiveInfoWithOrderId:(NSString *)orderId
                       success:(void (^)(id _Nonnull))successBlock
                       failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:orderId forKey:@"orderId"];
    [self postDataWithPath:getGiveInfoUrl
                parameters:parameters
                 needToken:YES
                   headers:@{}
                   success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 退款详情
 */
- (void)getRefundDetailInfoWithRefundId:(NSString *)refundId
                                success:(void (^)(id _Nonnull))successBlock
                                failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:refundId forKey:@"refundId"];
    [self getDataWithPath:getRefundDetailInfoUrl
               parameters:parameters
                needToken:YES
                  headers:@{}
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 取消见面
 */
- (void)cancelMeetWithOrderId:(NSString *)orderId
                      success:(void (^)(id _Nonnull))successBlock
                      failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:orderId forKey:@"orderId"];
    [self getDataWithPath:cancelMeetUrl
               parameters:parameters
                needToken:YES
                  headers:@{}
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

/**
 关注列表
 */
- (void)getFriendListWithPageNum:(NSString *)pageNum
                         success:(void (^)(id _Nonnull))successBlock
                         failure:(void (^)(NSError * _Nonnull))failureBlock {
    NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
    [parameters safe_setObject:pageNum forKey:@"pageNum"];
    [parameters safe_setObject:@"10" forKey:@"pageSize"];
    [self getDataWithPath:getAttentionListUrl
               parameters:parameters
                needToken:YES
                  headers:@{}
                  success:^(id  _Nonnull responseObject) {
        successBlock (responseObject);
    } failure:^(NSError * _Nonnull error) {
        failureBlock (error);
    }];
}

@end
